package com.woniu.mealsService.service;

import com.woniu.dto.OrderDto;
import com.woniu.mealsService.model.OrderProduct;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.param.AddOrderParam;
import com.woniu.param.GetPageOrderParam;
import com.woniu.utils.PageInfo;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author jiang
 * @since 2024年12月10日
 */
public interface OrderProductService extends IService<OrderProduct> {
    // 获取前20条已完成订单的商品信息
    Map<Long,List<String>> selectRate() throws Exception;

    PageInfo<OrderDto> getPageOrder(GetPageOrderParam bean) throws Exception;

    OrderDto getOrder(String orderId) throws Exception;

    String addOrder(AddOrderParam bean) throws Exception;

    String takOrder(String orderId, String userId) throws Exception;

    String cancelOrder(String orderId,String userId,String roleId) throws Exception;

    String pay(String orderId, String userId) throws Exception;

    String updateOrder(String outTradeNo, Integer OrderState) throws Exception;

    String alipayQuery(String orderId) throws Exception;
    // 订单关闭操作
    String closeOrder(String orderId) throws Exception;
    // 订单退款操作
    String refundOrder(String orderId) throws Exception;
    // 计算当日数据
    void calculateSales(Long StoreId) throws Exception;

    void saveErrorOrder(Map<String, String> map) throws Exception;
}
